package showtime.framework.algorithm.scroller
{
	import flash.display.BitmapData;
	import flash.geom.Point;
	import flash.geom.Rectangle;

	/**
	 * @project SunGame
	 * @date 2011-6-8
	 * @author 绿豆蛙
	 * 
	 */
	public class CopyPixelsScroller extends Scroller
	{
		public function CopyPixelsScroller(source:BitmapData, canvas:BitmapData)
		{
			super(source, canvas); 
		}
		
		
		override public function render(_currentX:int,_currentY:int,dx:int,dy:int):void 
		{
			canvas.copyPixels(source, new Rectangle(_currentX + dx, _currentY + dy, getCanvasWidth(), getCanvasHeight()), new Point(0, 0));
		}
		
		override public function dispose():void
		{
			super.dispose();
		}
	}
}